Repository navigation
Conversation
Bun 1.4.5 fixes CommonJS modules that a runtime `onLoad` plugin returns (oven-sh/bun#19279). Before, they lost their named exports, so the orchestrion transform could only run in `bun build`. `Sentry.init()` from `@sentry/bun` now registers the orchestrion transform with `Bun.plugin()`. The new `@sentry/bun/import` preload does the same before the app loads, so it also reaches the static imports of the entry module: bun --preload @sentry/bun/import app.ts On older Bun versions the SDK skips the registration, and the warning about missing channel injection tells users to upgrade Bun or build with `@sentry/bun/plugin`. `enableRuntimeChannelInjection: false` turns the registration off, as in `@sentry/node`. The injected snippet imports `@sentry/server-utils` from inside the instrumented package. Under isolated installs that specifier does not resolve from there, so an `onResolve` hook points it at the copy of `@sentry/server-utils` that the SDK already loaded. The new `node-suites-bun-run` integration project runs the auto-instrumentation suites unbuilt on Bun 1.4.5 or later, and CI runs the Bun integration tests on canary too, until 1.4.5 is released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
javascript-sdk-gitflow
Bot
requested review from
RulaKhaled,
andreiborza and
timfish
November 17, 2026 23:07
Contributor
size-limit report 📦Compared: aed1c80 (PR test merge using develop at d44a8ba) Against: d44a8ba (develop) · base run #66610 ✅ Baseline matches: this diff contains only this PR's changes.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ce0dbce. Configure here.
Move the `bun run` hook into `registerDiagnosticsChannelInjection()` in `@sentry/server-runtime-injection`, next to the Node and Deno hooks. The Node client already calls it on Bun, and `@sentry/bun/import` now loads `@sentry/node/import`. Before, `@sentry/bun` imported `@sentry/server-utils/orchestrion/bun` and so loaded the build-time bundler plugin on every import, which `runtime-entries.test.ts` forbids. The hook now uses the code transformer that `@sentry/server-runtime-injection` already bundles. It records each transformed module on `runtime` through the diagnostics hook, as on Node, so it needs no injected `@sentry/server-utils` import and no `onResolve` hook for isolated installs. The registration runs inside the existing `try`, so a failure warns and leaves the app without channel injection, as on Node. The `onLoad` callback catches its own errors and loads the module as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 62 successful. See the run.
Successful checks
|
Contributor
|
One or more gzipped bundles increased by more than 500 bytes. If this increase is intentional, add the Accept Bundlesize Increase label to this PR to rerun and accept the check. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Bun 1.4.5 fixes CommonJS modules that a runtime
onLoadplugin returns (oven-sh/bun#19279). Before, they lost their named exports, so the orchestrion transform could only run inbun build.Sentry.init()from@sentry/bunnow registers the orchestrion transform withBun.plugin(). The new@sentry/bun/importpreload does the same before the app loads, so it also reaches the static imports of the entry module:On older Bun versions the SDK skips the registration, and the warning about missing channel injection tells users to upgrade Bun or build with
@sentry/bun/plugin.enableRuntimeChannelInjection: falseturns the registration off, as in@sentry/node.The injected snippet imports
@sentry/server-utilsfrom inside the instrumented package. Under isolated installs that specifier does not resolve from there, so anonResolvehook points it at the copy of@sentry/server-utilsthat the SDK already loaded.The new
node-suites-bun-runintegration project runs the auto-instrumentation suites unbuilt on Bun 1.4.5 or later, and CI runs the Bun integration tests on canary too, until 1.4.5 is released.